﻿using System;
using System.Web.UI.WebControls;
using Medianamik.Core;
using Medianamik.Core.Sugar;
using Medianamik.UI.Web.MVP.View;

namespace Medianamik.UI.Web.Shop
{
    public partial class ShopPaymentProviderList : ModuleViewWithGrid<IPaymentProviderList>,
        IPaymentProviderList
    {
        public override IMedianamikGrid Grid
        {
            get { return PaymentProviderGrid as IMedianamikGrid; }
        }

        public override HyperLink AddButton
        {
            get { return AddArticleButton; }
        }

        public override string ListingPageUrl
        {
            get { return Pages.PaymentProviderList; }
        }

        public override string EditPageUrl
        {
            get
            {
                return Pages.ShopDesjardinsEdit;
                //Pages.Edit;//Pages.EditInvariantCulture;
            }
        }

        public override Guid BaseTypeId
        {
            get
            {
                return TypeIds.PaymentProviderBase;
            }
        }

        public override string TypeSelectorUrl
        {
            get
            {
                return Pages.RegionAndTaxTypeSelector
                    .AddParam(DefaultParamNames.ParentNodeID, ModuleNodeId)
                    .AddParam(DefaultParamNames.TypeID, BaseTypeId);
            }
        }

        public override Guid ModuleNodeId
        {
            get { return Modules.Shop; } //PageIds.PaymentProviderList; }
        }

        public override string BreadcrumbTrail
        {
            get { return Breadcrumbs.Text; }
            set { Breadcrumbs.Text = value; }
        }

        public override bool IsMultiLingual
        {
            get
            {
                return true;
            }
        }
    }

    public interface IPaymentProviderList : IModuleViewWithGrid
    {

    }
}
